package com.ruoyi.projects.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.projects.mapper.SlActivityReportsMapper;
import com.ruoyi.projects.domain.SlActivityReports;
import com.ruoyi.projects.service.ISlActivityReportsService;

/**
 * 活动报名记录Service业务层处理
 * 
 * @author yangz
 * @date 2024-12-02
 */
@Service
public class SlActivityReportsServiceImpl implements ISlActivityReportsService 
{
    @Autowired
    private SlActivityReportsMapper slActivityReportsMapper;

    /**
     * 查询活动报名记录
     * 
     * @param id 活动报名记录主键
     * @return 活动报名记录
     */
    @Override
    public SlActivityReports selectSlActivityReportsById(Long id)
    {
        return slActivityReportsMapper.selectSlActivityReportsById(id);
    }

    /**
     * 查询活动报名记录列表
     * 
     * @param slActivityReports 活动报名记录
     * @return 活动报名记录
     */
    @Override
    public List<SlActivityReports> selectSlActivityReportsList(SlActivityReports slActivityReports)
    {
        return slActivityReportsMapper.selectSlActivityReportsList(slActivityReports);
    }

    /**
     * 新增活动报名记录
     * 
     * @param slActivityReports 活动报名记录
     * @return 结果
     */
    @Override
    public int insertSlActivityReports(SlActivityReports slActivityReports)
    {
        slActivityReports.setCreateTime(DateUtils.getNowDate());
        return slActivityReportsMapper.insertSlActivityReports(slActivityReports);
    }

    /**
     * 修改活动报名记录
     * 
     * @param slActivityReports 活动报名记录
     * @return 结果
     */
    @Override
    public int updateSlActivityReports(SlActivityReports slActivityReports)
    {
        slActivityReports.setUpdateTime(DateUtils.getNowDate());
        return slActivityReportsMapper.updateSlActivityReports(slActivityReports);
    }

    /**
     * 批量删除活动报名记录
     * 
     * @param ids 需要删除的活动报名记录主键
     * @return 结果
     */
    @Override
    public int deleteSlActivityReportsByIds(Long[] ids)
    {
        return slActivityReportsMapper.deleteSlActivityReportsByIds(ids);
    }

    /**
     * 删除活动报名记录信息
     * 
     * @param id 活动报名记录主键
     * @return 结果
     */
    @Override
    public int deleteSlActivityReportsById(Long id)
    {
        return slActivityReportsMapper.deleteSlActivityReportsById(id);
    }
}
